<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="module">
        /*
        //1.通用的导入方式
        //引入m1.js模块内容
        import * as m1 from "./js/m1.js";
        console.log(m1);
        console.log(m1.school);
        m1.teach();
        //引入m2.js模块内容
        import * as m2 from "./js/m2.js";
        console.log(m2);
        console.log(m2.school);
        m2.findJob();
        //引入m3.js模块内容
        import * as m3 from "./js/m3.js";
        console.log(m3.default);
        console.log(m3.default.school);
        m3.default.change();
        */

        /*
        //2.解构赋值的形式
        import {school,teach} from "./js/m1.js";
        console.log(school);
        console.log(teach);
        //school已经被占用，所以可以用as修改变量名
        import {school as school1,findJob} from "./js/m2.js";
        console.log(school1);
        console.log(findJob);
        //默认暴露的写法
        import {default as m3 } from "./js/m3.js";
        console.log(m3);
        */
        
        //3.简便形式 此方法只能引入默认暴露
        import m3 from "./js/m3.js";
        console.log(m3);
    </script>
</head>
<body>
    <!--
        ES6模块化
    -->
</body>
</html>